home *** CD-ROM | disk | FTP | other *** search
/ Macromedia Multimedia Showcase 6.0 / Macromedia Multimedia Showcase v6.0 WIN-MAC (XMSH60CD)(Macromedia, Inc.)(1996).iso / pc / demosoft / freehand / data.5 / App / Usenglsh / lang8.dll / POST / 1102 < prev    next >
Text File  |  1996-10-03  |  9KB  |  419 lines

  1. /onlyk4{false}ndf
  2. /ccmyk{dup 5 -1 roll sub 0 max exch}ndf
  3. /cmyk2gray{
  4. 4 -1 roll 0.3 mul 4 -1 roll 0.59 mul 4 -1 roll 0.11 mul
  5. add add add 1 min neg 1 add
  6. }bdf
  7. /setcmykcolor{1 exch sub ccmyk ccmyk ccmyk pop setrgbcolor}ndf
  8. /maxcolor {    
  9. max max max        
  10. } ndf
  11. /maxspot {
  12. pop
  13. } ndf
  14. /setcmykcoloroverprint{4{dup -1 eq{pop 0}if 4 1 roll}repeat setcmykcolor}ndf
  15. /findcmykcustomcolor{5 packedarray}ndf
  16. /setcustomcolor{exch aload pop pop 4{4 index mul 4 1 roll}repeat setcmykcolor pop}ndf
  17. /setseparationgray{setgray}ndf
  18. /setoverprint{pop}ndf        
  19. /currentoverprint false ndf
  20. /cmykbufs2gray{
  21. 0 1 2 index length 1 sub
  22. {
  23. 4 index 1 index get    0.3 mul        
  24. 4 index 2 index get    0.59 mul    
  25. 4 index 3 index get    0.11 mul    
  26. 4 index 4 index get                
  27. add add add cvi 255 min
  28. 255 exch sub
  29. 2 index 3 1 roll put
  30. }for
  31. 4 1 roll pop pop pop
  32. }bdf
  33. /colorimage{
  34. pop pop
  35. [
  36. 5 -1 roll/exec cvx
  37. 6 -1 roll/exec cvx
  38. 7 -1 roll/exec cvx
  39. 8 -1 roll/exec cvx
  40. /cmykbufs2gray cvx
  41. ]cvx
  42. image
  43. }
  44. %. version 47.1 on Linotronic of Postscript defines colorimage incorrectly (rgb model only)
  45. version cvr 47.1 le
  46. statusdict /product get (Lino) anchorsearch{pop pop true}{pop false}ifelse
  47. and{userdict begin bdf end}{ndf}ifelse
  48. fhnumcolors 1 ne {/yt save def} if
  49. /customcolorimage{
  50. aload pop
  51. (_vc_Registration) eq
  52. {
  53. pop pop pop pop separationimage
  54. }
  55. {
  56. /ik xdf /iy xdf /im xdf /ic xdf
  57. ic im iy ik cmyk2gray /xt xdf
  58. currenttransfer
  59. {dup 1.0 exch sub xt mul add}concatprocs
  60. st
  61. image
  62. }
  63. ifelse
  64. }ndf
  65. fhnumcolors 1 ne {yt restore} if
  66. fhnumcolors 3 ne {/yt save def} if
  67. /customcolorimage{
  68. aload pop
  69. (_vc_Registration) eq
  70. {
  71. pop pop pop pop separationimage
  72. }
  73. {
  74. /ik xdf /iy xdf /im xdf /ic xdf
  75. 1.0 dup ic ik add min sub    
  76. 1.0 dup im ik add min sub    
  77. 1.0 dup iy ik add min sub    
  78. /ic xdf /iy xdf /im xdf
  79. currentcolortransfer
  80. 4 1 roll    
  81. {dup 1.0 exch sub ic mul add}concatprocs 4 1 roll    
  82. {dup 1.0 exch sub iy mul add}concatprocs 4 1 roll    
  83. {dup 1.0 exch sub im mul add}concatprocs 4 1 roll    
  84. setcolortransfer
  85. {/dummy xdf dummy}concatprocs{dummy}{dummy}true 3 colorimage
  86. }
  87. ifelse
  88. }ndf
  89. fhnumcolors 3 ne {yt restore} if
  90. fhnumcolors 4 ne {/yt save def} if
  91. /customcolorimage{
  92. aload pop
  93. (_vc_Registration) eq
  94. {
  95. pop pop pop pop separationimage
  96. }
  97. {
  98. /ik xdf /iy xdf /im xdf /ic xdf
  99. currentcolortransfer
  100. {1.0 exch sub ik mul ik sub 1 add}concatprocs 4 1 roll
  101. {1.0 exch sub iy mul iy sub 1 add}concatprocs 4 1 roll
  102. {1.0 exch sub im mul im sub 1 add}concatprocs 4 1 roll
  103. {1.0 exch sub ic mul ic sub 1 add}concatprocs 4 1 roll
  104. setcolortransfer
  105. {/dummy xdf dummy}concatprocs{dummy}{dummy}{dummy}
  106. true 4 colorimage
  107. }
  108. ifelse
  109. }ndf
  110. fhnumcolors 4 ne {yt restore} if
  111. /separationimage{image}ndf
  112. /spotascmyk false ndf
  113. /newcmykcustomcolor{6 packedarray}ndf
  114. /inkoverprint false ndf
  115. /setinkoverprint{pop}ndf        
  116. /setspotcolor {        
  117. spots exch get
  118. dup 4 get (_vc_Registration) eq
  119. {pop 1 exch sub setseparationgray}
  120. {0 5 getinterval exch setcustomcolor}
  121. ifelse
  122. }ndf
  123. /currentcolortransfer{currenttransfer dup dup dup}ndf
  124. /setcolortransfer{st pop pop pop}ndf
  125. /fas{}ndf
  126. /sas{}ndf
  127. /fhsetspreadsize{pop}ndf
  128. /filler{fill}bdf            
  129. /F{gsave {filler}fp grestore}bdf
  130. /f{closepath F}bdf
  131. /S{gsave {stroke}fp grestore}bdf
  132. /s{closepath S}bdf
  133. userdict /islevel2
  134. systemdict /languagelevel known dup
  135. {
  136. pop systemdict /languagelevel get 2 ge
  137. } if
  138. put
  139. islevel2 not
  140. {
  141. /currentcmykcolor
  142. {
  143. 0 0 0 1 currentgray sub
  144. } ndf
  145. } if
  146. /tc
  147. {
  148. gsave
  149. setcmykcolor currentcmykcolor
  150. grestore
  151. } bind def
  152. /testCMYKColorThrough
  153. {
  154. tc add add add 0 ne
  155. } bind def
  156. /fhiscomposite where not {
  157. userdict /fhiscomposite
  158. islevel2
  159. {
  160. gsave 1 1 1 1 setcmykcolor currentcmykcolor grestore
  161. add add add 4 eq
  162. }
  163. {
  164. 1 0 0 0 testCMYKColorThrough
  165. 0 1 0 0 testCMYKColorThrough
  166. 0 0 1 0 testCMYKColorThrough
  167. 0 0 0 1 testCMYKColorThrough
  168. and and and
  169. } ifelse
  170. put
  171. }
  172. { pop }
  173. ifelse
  174. /bc4 [0 0 0 0] def    
  175. /_lfp4 {
  176. /yt xdf                            
  177. /xt xdf                            
  178. /ang xdf                        
  179. storerect
  180. /taperfcn xdf
  181. /k2 xdf /y2 xdf /m2 xdf /c2 xdf
  182. /k1 xdf /y1 xdf /m1 xdf /c1 xdf
  183. c1 c2 sub abs
  184. m1 m2 sub abs
  185. y1 y2 sub abs
  186. k1 k2 sub abs
  187. maxcolor                        
  188. calcgraysteps mul abs round        
  189. height abs adjnumsteps            
  190. dup 1 lt {pop 1} if                
  191. 1 sub /numsteps1 xdf
  192. currentflat mark                
  193. currentflat clipflatness        
  194. /delta top bottom sub numsteps1 1 add div def    
  195. /right right left sub def        
  196. /botsv top delta sub def        
  197. {
  198. {
  199. W
  200. xt yt translate
  201. ang rotate
  202. xt neg yt neg translate
  203. dup setflat                
  204. /bottom botsv def
  205. 0 1 numsteps1            
  206. {
  207. numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse 
  208. taperfcn /frac xdf
  209. bc4 0 c2 c1 sub frac mul c1 add put
  210. bc4 1 m2 m1 sub frac mul m1 add put
  211. bc4 2 y2 y1 sub frac mul y1 add put
  212. bc4 3 k2 k1 sub frac mul k1 add put
  213. bc4 vc
  214. 1 index setflat        
  215. {
  216. mark {newpath left bottom right delta rectfill}stopped
  217. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  218. {cleartomark exit}ifelse
  219. }loop
  220. /bottom bottom delta sub def
  221. }for
  222. }
  223. gsave stopped grestore
  224. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  225. {exit}ifelse
  226. }loop
  227. cleartomark setflat
  228. }bdf
  229. /bcs [0 0] def    
  230. /_lfs4 {
  231. /yt xdf                            
  232. /xt xdf                            
  233. /ang xdf                        
  234. storerect
  235. /taperfcn xdf
  236. /tint2 xdf                        
  237. /tint1 xdf                        
  238. bcs exch 1 exch put                
  239. tint1 tint2 sub abs                
  240. bcs 1 get maxspot                
  241. calcgraysteps mul abs round        
  242. height abs adjnumsteps            
  243. dup 2 lt {pop 2} if                
  244. 1 sub /numsteps1 xdf
  245. currentflat mark                
  246. currentflat clipflatness        
  247. /delta top bottom sub numsteps1 1 add div def    
  248. /right right left sub def        
  249. /botsv top delta sub def        
  250. {
  251. {
  252. W
  253. xt yt translate
  254. ang rotate
  255. xt neg yt neg translate
  256. dup setflat                
  257. /bottom botsv def
  258. 0 1 numsteps1            
  259. {
  260. numsteps1 div taperfcn /frac xdf
  261. bcs 0
  262. 1.0 tint2 tint1 sub frac mul tint1 add sub
  263. put bcs vc
  264. 1 index setflat        
  265. {
  266. mark {newpath left bottom right delta rectfill}stopped
  267. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  268. {cleartomark exit}ifelse
  269. }loop
  270. /bottom bottom delta sub def
  271. }for
  272. }
  273. gsave stopped grestore
  274. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  275. {exit}ifelse
  276. }loop
  277. cleartomark setflat
  278. }bdf
  279. /_rfs6 {
  280. /tint2 xdf                        
  281. /tint1 xdf                        
  282. bcs exch 1 exch put                
  283. /inrad xdf                        
  284. /radius xdf                        
  285. /yt xdf                            
  286. /xt xdf                            
  287. tint1 tint2 sub abs                
  288. bcs 1 get maxspot                
  289. calcgraysteps mul abs round        
  290. radius inrad sub abs            
  291. adjnumsteps                        
  292. dup 1 lt {pop 1} if                
  293. 1 sub /numsteps1 xdf
  294. radius inrad sub numsteps1 dup 0 eq {pop} {div} ifelse    
  295. 2 div /halfstep xdf                
  296. currentflat mark                
  297. currentflat clipflatness        
  298. {
  299. {
  300. dup setflat                
  301. W                         
  302. 0 1 numsteps1            
  303. {
  304. dup /radindex xdf
  305. numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse 
  306. /frac xdf
  307. bcs 0
  308. tint2 tint1 sub frac mul tint1 add
  309. put bcs vc
  310. 1 index setflat        
  311. {
  312. newpath mark    
  313. xt yt radius inrad sub 1 frac sub mul halfstep add inrad add 0 360
  314. {    arc
  315. radindex numsteps1 ne
  316. inrad 0 gt or        
  317. {
  318. xt yt            
  319. numsteps1 0 eq
  320. { inrad }    
  321. {            
  322. radindex 1 add numsteps1 div 1 exch sub
  323. radius inrad sub mul halfstep add inrad add
  324. }ifelse
  325. dup xt add yt moveto
  326. 360 0 arcn
  327. } if
  328. fill
  329. }stopped
  330. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  331. {cleartomark exit}ifelse
  332. }loop
  333. }for
  334. }
  335. gsave stopped grestore
  336. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  337. {exit}ifelse
  338. }loop
  339. cleartomark setflat
  340. }bdf
  341. /_rfp6 {
  342. /k2 xdf /y2 xdf /m2 xdf /c2 xdf
  343. /k1 xdf /y1 xdf /m1 xdf /c1 xdf
  344. /inrad xdf                        
  345. /radius xdf                        
  346. /yt xdf                            
  347. /xt xdf                            
  348. c1 c2 sub abs
  349. m1 m2 sub abs
  350. y1 y2 sub abs
  351. k1 k2 sub abs
  352. maxcolor                    
  353. calcgraysteps mul abs round    
  354. radius inrad sub abs        
  355. adjnumsteps                    
  356. dup 1 lt {pop 1} if            
  357. 1 sub /numsteps1 xdf
  358. radius inrad sub numsteps1 dup 0 eq {pop} {div} ifelse    
  359. 2 div /halfstep xdf            
  360. currentflat mark            
  361. currentflat clipflatness    
  362. {
  363. {
  364. dup setflat            
  365. W                     
  366. 0 1 numsteps1        
  367. {
  368. dup /radindex xdf
  369. numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse 
  370. /frac xdf
  371. bc4 0 c2 c1 sub frac mul c1 add put
  372. bc4 1 m2 m1 sub frac mul m1 add put
  373. bc4 2 y2 y1 sub frac mul y1 add put
  374. bc4 3 k2 k1 sub frac mul k1 add put
  375. bc4 vc
  376. 1 index setflat        
  377. {
  378. newpath mark    
  379. xt yt radius inrad sub 1 frac sub mul halfstep add inrad add 0 360
  380. {    arc
  381. radindex numsteps1 ne
  382. inrad 0 gt or        
  383. {
  384. xt yt            
  385. numsteps1 0 eq
  386. { inrad }    
  387. {            
  388. radindex 1 add numsteps1 div 1 exch sub
  389. radius inrad sub mul halfstep add inrad add
  390. }ifelse
  391. dup xt add yt moveto
  392. 360 0 arcn
  393. } if
  394. fill
  395. }stopped
  396. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  397. {cleartomark exit}ifelse
  398. }loop
  399. }for
  400. }
  401. gsave stopped grestore
  402. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  403. {exit}ifelse
  404. }loop
  405. cleartomark setflat
  406. }bdf
  407. /lfp4{_lfp4}ndf
  408. /lfs4{_lfs4}ndf
  409. /rfs6{_rfs6}ndf
  410. /rfp6{_rfp6}ndf
  411. /cvc [0 0 0 1] def    
  412. /vc{
  413. AltsysDict /cvc 2 index put    
  414. aload length dup 4 eq
  415. {pop setcmykcolor}
  416. {6 eq {sethexcolor} {setspotcolor}    ifelse }
  417. ifelse
  418. }bdf